package com.cskaoyan.controller;

import com.cskaoyan.bean.Region;
import com.cskaoyan.service.RegionService;
import com.cskaoyan.vo.BaseRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RegionController {

    @Autowired
    RegionService regionService;

    @RequestMapping("admin/region/list")
    public BaseRespVo queryRegion(){
        List<Region> regions = regionService.queryRegion();
        return BaseRespVo.ok(regions);
    }

}
